Skip to content

[PNE-9755] Warn on import of removed generative design and sampling names - #1077

Merged
dleblanc merged 11 commits into
feature/PNE-9755-remove-generative-design-samplingfrom
feature/PNE-9755-remove-generative-design-sampling-fixes
Nov 18, 2026
Merged

dleblanc merged 11 commits into
feature/PNE-9755-remove-generative-design-samplingfrom
feature/PNE-9755-remove-generative-design-sampling-fixes

Conversation

@kroenlein

@kroenlein kroenlein commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR merges into #1074, for PNE-9755. It changes how #1074 retires generative design and design space sampling.

#1074 deleted the execution, result and collection classes, so a script that imported one failed with ImportError. This PR brings back every name that version 5.3.1 exported, at its old import path:

Use Result
Import a removed name DeprecationWarning that names 6.0.0 as the removal version
Construct a removed class FeatureRemovedError with the platform's message
Read a method from a removed class, such as trigger or results FeatureRemovedError
Read project.generative_design_executions or design_space.sample_design_space_executions FeatureRemovedError, with no network call, as in #1074

FingerprintType and StructureExclusion keep their members. import citrine does not emit a new warning, because each legacy module supplies its names through a module __getattr__. The warning points at the importing line, so Python shows it in a script by default.

citrine._utils.removed_features holds every stand-in. A test fails once the version reaches 6.0.0, and its message lists what to delete.

This PR also merges main, which had reached 5.3.1 and conflicted with #1074's 5.3.0. No import that worked in 5.3.x breaks, so the version moves to 5.4.0.

PR Type

  • Breaking change (fix or feature that would cause existing functionality to change)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Maintenance (non-breaking change to assist developers)

Adherence to team decisions

  • I have added tests for 100% coverage
  • I have written Numpy-style docstrings for every method and class.
  • I have communicated the downstream consequences of the PR to others.
  • I have bumped the version in __version__.py

🤖 Generated with Claude Code

pacdaemon and others added 7 commits November 10, 2026 17:50
…-fallback

Tolerate unknown ingestion error types
AGENTS.md gives coding agents the repo layout, the setup, lint, and test
commands that CI runs, and the conventions a PR must follow. CLAUDE.md
imports it for Claude Code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ve-generative-design-sampling-fixes

# Conflicts:
#	src/citrine/__version__.py
…ames

Version 5.3.x let scripts import the execution, result and collection
classes of both features. The first removal commit deleted them, so
those imports raised ImportError.

Every name a released version exported now imports again from its old
module. A module __getattr__ supplies each one and emits a
DeprecationWarning that names 6.0.0 as the removal version. The warning
points at the importing line, so Python shows it in a script by default.
Constructing a removed class, or reading a method from it, raises
FeatureRemovedError with the platform's message. FingerprintType and
StructureExclusion keep their members.

citrine._utils.removed_features holds the stand-ins. A test fails once
the version reaches 6.0.0, to prompt their deletion.

Version 5.4.0, after merging main at 5.3.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kroenlein
kroenlein marked this pull request as ready for review November 18, 2026 15:40
@kroenlein
kroenlein requested a review from a team as a code owner November 18, 2026 15:40
kroenlein and others added 4 commits November 18, 2026 08:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ve-generative-design-sampling-fixes

# Conflicts:
#	src/citrine/__version__.py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dleblanc
dleblanc merged commit 89d1d6f into feature/PNE-9755-remove-generative-design-sampling Nov 18, 2026
@dleblanc
dleblanc deleted the feature/PNE-9755-remove-generative-design-sampling-fixes branch November 18, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants